using System;
using System.Threading;

//线程是通过扩展 Thread 类创建的。扩展的 Thread 类调用 Start() 方法来开始子线程的执行。
namespace MultithreadingApplication
{
  class ThreadCreationProgram
  {
    public static void CallToChildThread()
    {
      Console.WriteLine("Child thread starts");
    }

    static void Main(string[] args)
    {
      ThreadStart childref = new ThreadStart(CallToChildThread);
      Console.WriteLine("In Main: Creating the Child thread");
      Thread childThread = new Thread(childref);
      childThread.Start();
      Console.ReadKey();
    }
  }
}